package com.szewec.fsd.api.[[module]].entity;

import com.baomidou.mybatisplus.annotation.*;
import java.io.Serializable;
[%- for field in entity.fields -%]
[% if (field.type == 'BigDecimal') %]
import java.math.BigDecimal;
[%- endif -%]
[%- endfor %]
import java.util.Date;

import com.szewec.fsd.common.feishu.common.annotation.FsBiTableField;
import lombok.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * <p>
 * [[entity.comment]]
 * </p>
 * @version 1.0
 * @author: [[authorInfo.author]]
 * @date: [[authorInfo.timestamp]]
 */
@Data
@ApiModel(value = "[[entity.comment]]")
@EqualsAndHashCode
@Builder
@TableName("[[entity.tableName]]")
@NoArgsConstructor
@AllArgsConstructor
public class [[entity.name]] implements Serializable {

    private static final long serialVersionUID = 1L;

    [% for field in entity.fields -%]
    [%- if (field.isPrimary) -%]
    /**
     * [[field.comment]]
     */
    @ApiModelProperty(value = "[[field.comment]]", hidden = true)
    @TableId(type = IdType.ASSIGN_ID)
    private [[field.type]] [[field.name]];
    [% endif %]
    [% if not (field.isPrimary or field.isBaseKey) -%]
    /**
     * [[field.comment]]
     */
    @ApiModelProperty(value = "[[field.comment]]" [% if not (field.isFeishuBiTableField) %], hidden = true[% endif %])
    [% if (field.isInsertFillKey) -%]
    @TableField(value = "[[field.columnName]]", fill = FieldFill.INSERT)
    [% elif (field.isInsertUpdateFillKey) -%]
    @TableField(value = "[[field.columnName]]", fill = FieldFill.INSERT_UPDATE)
    [% elif (field.isUpdateFillKey) -%]
    @TableField(value = "[[field.columnName]]", fill = FieldFill.UPDATE)
    [% else -%]
    @TableField("[[field.columnName]]")
    [% endif -%]
    [% if (field.isDeleteKey) -%]
    @TableLogic
    [% endif -%]
    [% if (field.isFeishuBiTableField) -%]
    @FsBiTableField("[[field.comment]]")
    [% endif -%]
    private [[field.type]] [[field.name]];
    [%- endif -%]
    [%- endfor %]


}
